<?php

use yii\db\Migration;

/**
 * Handles adding columns to table `{{%common_image}}`.
 */
class m230201_102615_add_new_column_to_common_image_table extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->addColumn('{{%common_image}}', 'size_px', $this->string());
        $this->addColumn('{{%common_image}}', 'size_b', $this->integer());
        $this->addColumn('{{%common_image}}', 'comment', $this->string(512));
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        $this->dropColumn('{{%common_image}}', 'size_px');
        $this->dropColumn('{{%common_image}}', 'size_b');
        $this->dropColumn('{{%common_image}}', 'comment');
    }
}
